package exam.web.action.base;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

import exam.model.dao.ExaminationDAO;
import exam.model.entity.TExaminationEntity;

/**
 * <p>QuestionActionBase</p>
 * 
 * @author PhongTN
 * @version 02/05/2012
 */

public class ExaminationActionBase extends ActionSupport 
		implements ModelDriven<TExaminationEntity>, ServletRequestAware, ServletResponseAware {
	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = 1L;

	// questionEntity
	protected TExaminationEntity tExaminationEntity = new TExaminationEntity();
	
	// questionDAO
	protected ExaminationDAO examDAO = new ExaminationDAO();
	
	// request
	protected HttpServletRequest request;
	
	// response
	protected HttpServletResponse response;
	
	@Override
	public TExaminationEntity getModel() {
		// TODO Auto-generated method stub
		return tExaminationEntity;
	}

	@Override
	public void setServletResponse(HttpServletResponse response) {
		// TODO Auto-generated method stub
		this.response = response;
	}

	@Override
	public void setServletRequest(HttpServletRequest request) {
		// TODO Auto-generated method stub
		this.request = request;
	}

	public TExaminationEntity gettExaminationEntity() {
		return tExaminationEntity;
	}

	public void settExaminationEntity(TExaminationEntity tExaminationEntity) {
		this.tExaminationEntity = tExaminationEntity;
	}

	
}
